[mirrors]
http://download.netsurf-browser.org/netsurf/releases/source-full/netsurf-all-3.1.tar.gz

[main]
filesize=5764177
sha512=50035895e99d5e16ef41b8b5fe484fee4458807b1c3b2b44284d702b8fbf325fc26cf89d9f550817f17bb35dd8dfce7eda1674f6aa636cfd1a62a5a91bacb89a

[deps]
libpng
curl
libxml2
cairo
gtk+2
libglade
libmng
liblcms

[deps.host]
perl
cpan-HTML-Parser
flex
gperf

[build]
# FIXME: netsurfs Makefile suppresses parallel builds
CFLAGS="-I$butch_prefix/include/cairo/" NETSURF_USE_BMP=NO \
 make -j$MAKE_THREADS || exit 1
make DESTDIR="$butch_install_dir" install || exit 1

# g_get_language_names returns "C" only, but the symlink is messed up
# this causes missing translations (file name is "Messages") and the welcome page
# not to be found
dest="$butch_install_dir""$butch_prefix"
rm -rf "$dest"/share/netsurf/C
ln -sf en "$dest"/share/netsurf/C

mkdir -p "$dest"/share/applications
cat << EOF > "$dest"/share/applications/netsurf.desktop
[Desktop Entry]
Name=Netsurf 
Comment=Web Browser
Exec=netsurf 
Icon=netsurf 
MimeType=text/html;x-scheme-handler/http;x-scheme-handler/https;
Terminal=false
Type=Application
Categories=GTK;Network;WebBrowser; 
EOF
